{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}/Users/ashutosh/Desktop/SenateRepublicanCommitteeRequests.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res} 2 Jun 2025, 10:36:17

{com}. do "/Users/ashutosh/Desktop/Submissions/Matching Politicians/PSRM Replication Files/SenateRepublicanCommitteeRequests.do"
{txt}
{com}. // This file replicates Figure A1
. 
. 
. clear
{txt}
{com}. // Download the Republican Committee Requests data
. use SenateRepublicanCommitteeRequests.dta
{txt}
{com}. 
. 
. **************
. ** Figure A1 **
. **************
. 
. // Generate an indicator variable for being a Freshman
. gen Freshman = 1 if chambsen == 1
{txt}(73 missing values generated)

{com}. replace Freshman = 0 if chambsen != 1
{txt}(73 real changes made)

{com}. 
. // Counts number of Constituency Committees Requested in 1st Request
. // Note Constituency committees are 1) Small Business, 2) Veterans Affairs, 3) Agriculture 4) Armed Services, 5) Energy
. 
. gen ConstituencyReq1 = 1 if commreq1 == "Small Business" | commreq1 == "Veterans Affairs" | commreq1 == "Agriculture" | commreq1 == "Armed Services" | commreq1 == "Energy"
{txt}(80 missing values generated)

{com}. 
. // Counts number of Policy Committees Requested in 1st Request
. // Note Policy committees are 1) Banking, Housing, and Urban Affairs, 2) Commerce, Science and Transportation, 3) Environment and Public Works, 4) Finance, 5) Foreign Relations, 6) Government Affairs, 7) Judiciary, 8) Labor and Human Resources
. 
. bysort Freshman: summarize ConstituencyReq1

{txt}{hline}
-> Freshman = 0

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
Constituen~1 {c |}{res}          3           1           0          1          1

{txt}{hline}
-> Freshman = 1

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
Constituen~1 {c |}{res}          4           1           0          1          1

{txt}
{com}. 
. gen PolicyReq1 = 1 if commreq1 == "Banking" | commreq1 == "Commerce" | commreq1 == "Environment" | commreq1 == "Finance" | commreq1 == "Foreign Relations" | commreq1 == "Government Affairs" | commreq1 == "Judiciary" | commreq1 == "Labor"
{txt}(62 missing values generated)

{com}. 
. bysort Freshman: summarize PolicyReq1

{txt}{hline}
-> Freshman = 0

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}PolicyReq1 {c |}{res}         18           1           0          1          1

{txt}{hline}
-> Freshman = 1

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}PolicyReq1 {c |}{res}          7           1           0          1          1

{txt}
{com}. 
. 
. // Counts number of Prestige Committees Requested in 1st Request
. // Note Constituency committees are 1) Appropriations, 2) Budget, 3) Rules and Administration
. 
. gen PrestigeReq1 = 1 if commreq1 == "Appropriations" | commreq1 == "Budget" | commreq1 == "Rules"
{txt}(77 missing values generated)

{com}. 
. bysort Freshman: summarize PrestigeReq1

{txt}{hline}
-> Freshman = 0

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
PrestigeReq1 {c |}{res}          7           1           0          1          1

{txt}{hline}
-> Freshman = 1

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
PrestigeReq1 {c |}{res}          3           1           0          1          1

{txt}
{com}. 
. 
. // Counts number of Admin Committees Requested in 1st Request
. // Note Constituency committees are 1) District of Columbia, 2) Post Office
. gen AdminReq1 = 1 if commreq1 == "District of Columbia" | commreq1 == "Post Office" 
{txt}(86 missing values generated)

{com}. 
. bysort Freshman: summarize AdminReq1

{txt}{hline}
-> Freshman = 0

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 3}AdminReq1 {c |}{res}          1           1           .          1          1

{txt}{hline}
-> Freshman = 1

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 3}AdminReq1 {c |}{res}          0

{txt}
{com}. 
. 
. 
. // Now we can create a pie-chart for the category of committee requested as first choice by Freshman
. * Calculate sums for the subset where Freshman == 1
. summarize PrestigeReq1 if Freshman == 1

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
PrestigeReq1 {c |}{res}          3           1           0          1          1
{txt}
{com}. gen sum_prestige_f = r(sum)
{txt}
{com}. 
. summarize ConstituencyReq1 if Freshman == 1

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
Constituen~1 {c |}{res}          4           1           0          1          1
{txt}
{com}. gen sum_constituency_f = r(sum)
{txt}
{com}. 
. summarize AdminReq1 if Freshman == 1

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 3}AdminReq1 {c |}{res}          0
{txt}
{com}. gen sum_admin_f = r(sum)
{txt}
{com}. 
. summarize PolicyReq1 if Freshman == 1

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}PolicyReq1 {c |}{res}          7           1           0          1          1
{txt}
{com}. gen sum_policy_f = r(sum)
{txt}
{com}. 
. 
. graph pie sum_prestige_f sum_constituency_f sum_admin_f sum_policy_f
{res}{txt}
{com}. 
. * Save graph of Figure A1 for Freshmen
. graph save FigureA1_Freshmen
{res}{txt}file {bf:FigureA1_Freshmen.gph} saved

{com}. 
. scalar Freshman_Prestige_Req1 = sum_prestige_f /(sum_prestige_f + sum_constituency_f + sum_admin_f + sum_policy_f)
{txt}
{com}. display Freshman_Prestige_Req1
{res}.21428571
{txt}
{com}. 
. 
. scalar Freshman_Admin_Req1 = sum_admin_f /(sum_prestige_f + sum_constituency_f + sum_admin_f + sum_policy_f)
{txt}
{com}. display Freshman_Admin_Req1
{res}0
{txt}
{com}. 
. 
. scalar Freshman_Constituency_Req1 = sum_constituency_f /(sum_prestige_f + sum_constituency_f + sum_admin_f + sum_policy_f)
{txt}
{com}. display  Freshman_Constituency_Req1 
{res}.28571429
{txt}
{com}. 
. 
. scalar Freshman_Policy_Req1 = sum_policy_f /(sum_prestige_f + sum_constituency_f + sum_admin_f + sum_policy_f)
{txt}
{com}. display Freshman_Policy_Req1
{res}.5
{txt}
{com}. 
. 
. 
. // Now we can create a pie-chart for the category of committee requested as first choice by Non-Freshman
. * Calculate sums for the subset where Freshman == 0
. summarize PrestigeReq1 if Freshman == 0

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
PrestigeReq1 {c |}{res}          7           1           0          1          1
{txt}
{com}. gen sum_prestige_nf = r(sum)
{txt}
{com}. 
. summarize ConstituencyReq1 if Freshman == 0

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
Constituen~1 {c |}{res}          3           1           0          1          1
{txt}
{com}. gen sum_constituency_nf = r(sum)
{txt}
{com}. 
. summarize AdminReq1 if Freshman == 0

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 3}AdminReq1 {c |}{res}          1           1           .          1          1
{txt}
{com}. gen sum_admin_nf = r(sum)
{txt}
{com}. 
. summarize PolicyReq1 if Freshman == 0

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}PolicyReq1 {c |}{res}         18           1           0          1          1
{txt}
{com}. gen sum_policy_nf = r(sum)
{txt}
{com}. 
. 
. graph pie sum_prestige_nf sum_constituency_nf sum_admin_nf sum_policy_nf
{res}{txt}
{com}. 
. * Save graph of Figure A1 for NonFreshmen
. graph save FigureA1_NonFreshmen
{res}{txt}file {bf:FigureA1_NonFreshmen.gph} saved

{com}. 
. scalar NonFreshman_Prestige_Req1 = sum_prestige_nf /(sum_prestige_nf + sum_constituency_nf + sum_admin_nf + sum_policy_nf)
{txt}
{com}. display NonFreshman_Prestige_Req1
{res}.24137931
{txt}
{com}. 
. 
. scalar NonFreshman_Admin_Req1 = sum_admin_nf /(sum_prestige_nf + sum_constituency_nf + sum_admin_nf + sum_policy_nf)
{txt}
{com}. display NonFreshman_Admin_Req1
{res}.03448276
{txt}
{com}. 
. 
. scalar NonFreshman_Constituency_Req1 = sum_constituency_nf /(sum_prestige_nf + sum_constituency_nf + sum_admin_nf + sum_policy_nf)
{txt}
{com}. display  NonFreshman_Constituency_Req1 
{res}.10344828
{txt}
{com}. 
. 
. scalar NonFreshman_Policy_Req1 = sum_policy_nf /(sum_prestige_nf + sum_constituency_nf + sum_admin_nf + sum_policy_nf)
{txt}
{com}. display NonFreshman_Policy_Req1
{res}.62068966
{txt}
{com}. 
{txt}end of do-file

{com}. log close
      {txt}name:  {res}<unnamed>
       {txt}log:  {res}/Users/ashutosh/Desktop/SenateRepublicanCommitteeRequests.smcl
  {txt}log type:  {res}smcl
 {txt}closed on:  {res} 2 Jun 2025, 10:36:28
{txt}{.-}
{smcl}
{txt}{sf}{ul off}